Routines (alphabetical) > Routines: F > FORMAT_AXIS_VALUES

FORMAT_AXIS_VALUES

Syntax | Return Value | Arguments | Keywords | Examples | Version History

The FORMAT_AXIS_VALUES function converts a vector of numeric values into a vector of string values. This routine uses the same rules for formatting as do the axis routines that label tick marks given a set of tick values.

Syntax

Result = FORMAT_AXIS_VALUES( Values )

Return Value

Returns a vector of formatted string values from an input vector of numeric values.

Arguments

Values

Set this argument to a vector of numeric values to be formatted.

Keywords

None.

Examples

Suppose we have a vector of axis values:

axis_values = [7.9, 12.1, 15.3, 19.0]

Convert these values into an array of strings:

new_values = FORMAT_AXIS_VALUES(axis_values)
HELP, new_values
PRINT, new_values
PRINT, axis_values

IDL prints:

NEW_VALUES STRING = Array[4]

7.9 12.1 15.3 19.0

7.90000 12.1000 15.3000 19.0000

Version History

5.1

Introduced